{% load static %}

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
     <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.min.css' %}">
    <style>
        .account{
            width: 400px;
            height: 350px;
            border: 1px solid #3c3c3c;
            border-radius: 5px;
            margin: 150px auto 0;
            padding:20px 40px;
            box-shadow: 5px 5px 5px #999999;
        }
        .account h2{
            text-align: center;
        }
    </style>
</head>

<body>
<div class="account">
    <h2>用户登陆</h2>
<form method="post" novalidate>
    {% csrf_token %}

  <div class="form-group">
      <label>用户名</label>
         {{ form.username }}
      <span style="color: red;">{{ form.errors.0 }}</span>
      <label>密 码</label>
        {{ form.password }}
        <span style="color: red;">{{ form.errors.0 }}</span>

    </div>
    <div class="form-group">
            <label class="id_code">图片验证码</label>
        <div class="row">
            <div class="col-xs-7">
               {{ form.code }}
                 <span style="color: red;">{{ form.code.errors.0 }}</span>
            </div>
            <div class="col-xs-5">
                <img src="/image/code/" alt="验证码" id="image_code" style="width: 125px;">
            </div>
        </div>
    </div>
  <button type="submit" class="btn btn-primary">登陆</button>
</form>

</div>

</div>
</body>
</html>